#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import socketserver


class My_header(socketserver.BaseRequestHandler):
    def handle(self):
        print(self.client_address)
        print(self.request)
        data = self.request.recv(1024)
        self.request.send(data.upper())


if __name__ == '__main__':
    server = socketserver.ThreadingTCPServer(("127.0.0.1", 2010), My_header)
    server.serve_forever()
